package actiontiktokcasemyredis

type LotteryCases struct {
}

var LotteryCasesObject LotteryCases

const (
	// 碎片可赠送次数获取类型
	PieceGiveNumGetTypeBasicCfg     = 0 // 使用保底配置
	PieceGiveNumGetTypeLottery      = 1 // 抽满次数获取
	PieceGiveNumGetTypeGiveOther    = 2 // 赠送碎片减少
	PieceGiveNumGetTypeAdminOperate = 3 // 后台补发

	// 碎片可赠送次数加减 枚举
	PieceGiveNumChangeLogTypeAdd     = 1 //增加
	PieceGiveNumChangeLogTypeReduced = 2 //减少

	// 服饰获取加减 枚举
	ClothesChangeLogTypeAdd     = 1 //增加
	ClothesChangeLogTypeReduced = 2 //减少

	// 挖矿奖励发放枚举
	MiningSendRewardsScript          = 1 //脚本
	MiningSendRewardsExitProactively = 2 // 离开城池

	// 服饰获取来源
	ActionComposeClothesChangeLogSourceDirectLottery       = 1 // 抽奖直接获得
	ActionComposeClothesChangeLogSourceAdminAdd            = 2 // 后台补发
	ActionComposeClothesChangeLogSourceHourRank            = 3 // 小时榜发放
	ActionComposeClothesChangeLogSourceDayRank             = 4 // 日榜发放
	ActionComposeClothesChangeLogSourceSingleWeekRank      = 5 // 个人周榜发放
	ActionComposeClothesChangeLogSourceCoupleWeekRank      = 6 // CP周榜发放
	ActionComposeClothesChangeLogSourceGiftPackageActivity = 7 // 礼包活动
	ActionComposeClothesChangeLogSourcePrizeDrawCPGift     = 8 // 抽奖CP赠送
	ActionComposeClothesChangeLogSourceGiftPackCPGift      = 9 // 礼包CP赠送

	// 抽奖信息队列枚举
	ActionObserveLotteryListLogSourceRoomGiftPush         = 1 // 直播间刷礼物推送
	ActionObserveLotteryListLogSourceDistributeNumberPush = 2 // 补发抽奖次数推送
	ActionObserveLotteryListLogSourceRoomPull             = 3 // 直播间拉取
)

func (e LotteryCases) PieceGivCasesourceNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.PieceGivCasesource() {
		m[s] = e.PieceGivCasestring(s)
	}
	return m
}

func (e LotteryCases) PieceGivCasesource() []int {
	return []int{
		PieceGiveNumGetTypeBasicCfg,
		PieceGiveNumGetTypeLottery,
		PieceGiveNumGetTypeGiveOther,
		PieceGiveNumGetTypeAdminOperate,
	}
}

func (e LotteryCases) ClothesChangeLogSourceNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.ClothesChangeLogSource() {
		m[s] = e.ClothesChangeLogString(s)
	}
	return m
}

func (e LotteryCases) ClothesChangeLogSource() []int {
	return []int{
		ActionComposeClothesChangeLogSourceDirectLottery,
		ActionComposeClothesChangeLogSourceAdminAdd,
		ActionComposeClothesChangeLogSourceHourRank,
		ActionComposeClothesChangeLogSourceDayRank,
		ActionComposeClothesChangeLogSourceSingleWeekRank,
		ActionComposeClothesChangeLogSourceCoupleWeekRank,
		ActionComposeClothesChangeLogSourceGiftPackageActivity,
		ActionComposeClothesChangeLogSourcePrizeDrawCPGift,
		ActionComposeClothesChangeLogSourceGiftPackCPGift,
	}
}

// 碎片可赠送次数枚举
func (e LotteryCases) PieceGivCasestring(tag int) string {
	switch tag {
	case PieceGiveNumGetTypeBasicCfg:
		return "使用保底配置"
	case PieceGiveNumGetTypeLottery:
		return "抽满次数获取"
	case PieceGiveNumGetTypeGiveOther:
		return "赠送碎片减少"
	case PieceGiveNumGetTypeAdminOperate:
		return "后台补发"
	default:
		return "未知"
	}
}

// 一级服饰枚举
func (e LotteryCases) ClothesChangeLogString(tag int) string {
	switch tag {
	case ActionComposeClothesChangeLogSourceDirectLottery:
		return "抽奖直接获得"
	case ActionComposeClothesChangeLogSourceAdminAdd:
		return "后台补发"
	case ActionComposeClothesChangeLogSourceHourRank:
		return "小时榜发放"
	case ActionComposeClothesChangeLogSourceDayRank:
		return "日榜发放"
	case ActionComposeClothesChangeLogSourceSingleWeekRank:
		return "个人周榜发放"
	case ActionComposeClothesChangeLogSourceCoupleWeekRank:
		return "CP周榜发放"
	case ActionComposeClothesChangeLogSourceGiftPackageActivity:
		return "礼包活动"
	case ActionComposeClothesChangeLogSourcePrizeDrawCPGift:
		return "抽奖CP赠送"
	case ActionComposeClothesChangeLogSourceGiftPackCPGift:
		return "礼包CP赠送"
	default:
		return "未知"
	}
}

// 挖矿奖励发放枚举
func (e LotteryCases) MiningSendRewardsLogSourceNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.MiningSendRewardsLogSource() {
		m[s] = e.MiningSendRewardsLogString(s)
	}
	return m
}

func (e LotteryCases) MiningSendRewardsLogSource() []int {
	return []int{
		MiningSendRewardsScript,
		MiningSendRewardsExitProactively,
	}
}

func (e LotteryCases) MiningSendRewardsLogString(tag int) string {
	switch tag {
	case MiningSendRewardsScript:
		return "脚本"
	case MiningSendRewardsExitProactively:
		return "离开城池"
	default:
		return "未知"
	}
}

// 抽奖信息队列枚举
func (e LotteryCases) LotteryListLogSourceNameMap() map[int]string {
	m := make(map[int]string)
	for _, s := range e.LotteryListLogSource() {
		m[s] = e.LotteryListLogString(s)
	}
	return m
}

func (e LotteryCases) LotteryListLogSource() []int {
	return []int{
		ActionObserveLotteryListLogSourceRoomGiftPush,
		ActionObserveLotteryListLogSourceDistributeNumberPush,
		ActionObserveLotteryListLogSourceRoomPull,
	}
}

func (e LotteryCases) LotteryListLogString(tag int) string {
	switch tag {
	case ActionObserveLotteryListLogSourceRoomGiftPush:
		return "直播间刷礼物推送"
	case ActionObserveLotteryListLogSourceDistributeNumberPush:
		return "补发抽奖次数推送"
	case ActionObserveLotteryListLogSourceRoomPull:
		return "直播间拉取"
	default:
		return "未知"
	}
}
